package com.foodsafe.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;

/**
 * Goods entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "goods", catalog = "foodsafe")
public class Goods implements java.io.Serializable {

	// Fields

	@Expose
	private Integer goodsId;
	@Expose
	private Goodcategory goodcategory;
	@Expose
	private String goodsChineseName;
	@Expose
	private String goodsEnglishName;
	@Expose
	private String goodsAlias1;
	@Expose
	private String goodsAlias2;
	@Expose
	private String goodsBarCode;
	@Expose
	private String goodsIngredients;
	@Expose
	private String goodsManufacturer;
	@Expose
	private String goodsManurAddr;
	@Expose
	private String goodsBrandManu;
	@Expose
	private String productionStandard;
	@Expose
	private String producerUrl;
	@Expose
	private String producerPhoneNum;
	@Expose
	private String goodsLicense;
	@Expose
	private Boolean examine;


	// Constructors

	/** default constructor */
	public Goods() {
	}

	/** minimal constructor */
	public Goods(Boolean examine) {
		this.examine = examine;
	}



	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "GoodsId", unique = true, nullable = false)
	public Integer getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "GoodCategoryId")
	public Goodcategory getGoodcategory() {
		return this.goodcategory;
	}

	public void setGoodcategory(Goodcategory goodcategory) {
		this.goodcategory = goodcategory;
	}

	@Column(name = "GoodsChineseName", length = 32)
	public String getGoodsChineseName() {
		return this.goodsChineseName;
	}

	public void setGoodsChineseName(String goodsChineseName) {
		this.goodsChineseName = goodsChineseName;
	}

	@Column(name = "GoodsEnglishName", length = 32)
	public String getGoodsEnglishName() {
		return this.goodsEnglishName;
	}

	public void setGoodsEnglishName(String goodsEnglishName) {
		this.goodsEnglishName = goodsEnglishName;
	}

	@Column(name = "GoodsAlias1", length = 32)
	public String getGoodsAlias1() {
		return this.goodsAlias1;
	}

	public void setGoodsAlias1(String goodsAlias1) {
		this.goodsAlias1 = goodsAlias1;
	}

	@Column(name = "GoodsAlias2", length = 32)
	public String getGoodsAlias2() {
		return this.goodsAlias2;
	}

	public void setGoodsAlias2(String goodsAlias2) {
		this.goodsAlias2 = goodsAlias2;
	}

	@Column(name = "GoodsBarCode", length = 16)
	public String getGoodsBarCode() {
		return this.goodsBarCode;
	}

	public void setGoodsBarCode(String goodsBarCode) {
		this.goodsBarCode = goodsBarCode;
	}

	@Column(name = "GoodsIngredients", length = 256,nullable=false)
	public String getGoodsIngredients() {
		return this.goodsIngredients;
	}

	public void setGoodsIngredients(String goodsIngredients) {
		this.goodsIngredients = goodsIngredients;
	}

	@Column(name = "GoodsManufacturer", length = 32)
	public String getGoodsManufacturer() {
		return this.goodsManufacturer;
	}

	public void setGoodsManufacturer(String goodsManufacturer) {
		this.goodsManufacturer = goodsManufacturer;
	}

	@Column(name = "GoodsManurAddr", length = 32)
	public String getGoodsManurAddr() {
		return this.goodsManurAddr;
	}

	public void setGoodsManurAddr(String goodsManurAddr) {
		this.goodsManurAddr = goodsManurAddr;
	}

	@Column(name = "GoodsBrandManu", length = 64)
	public String getGoodsBrandManu() {
		return this.goodsBrandManu;
	}

	public void setGoodsBrandManu(String goodsBrandManu) {
		this.goodsBrandManu = goodsBrandManu;
	}

	@Column(name = "ProductionStandard", length = 32)
	public String getProductionStandard() {
		return this.productionStandard;
	}

	public void setProductionStandard(String productionStandard) {
		this.productionStandard = productionStandard;
	}

	@Column(name = "ProducerURL", length = 32)
	public String getProducerUrl() {
		return this.producerUrl;
	}

	public void setProducerUrl(String producerUrl) {
		this.producerUrl = producerUrl;
	}

	@Column(name = "ProducerPhoneNum", length = 32)
	public String getProducerPhoneNum() {
		return this.producerPhoneNum;
	}

	public void setProducerPhoneNum(String producerPhoneNum) {
		this.producerPhoneNum = producerPhoneNum;
	}

	@Column(name = "GoodsLicense", length = 32)
	public String getGoodsLicense() {
		return this.goodsLicense;
	}

	public void setGoodsLicense(String goodsLicense) {
		this.goodsLicense = goodsLicense;
	}

	@Column(name = "Examine", nullable = false)
	public Boolean getExamine() {
		return this.examine;
	}

	public void setExamine(Boolean examine) {
		this.examine = examine;
	}


}